﻿using System;
using System.Drawing;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

namespace RPGOnline.Rendering
{
	public interface IRenderer
	{
		void Clear(Color color);
		void DrawQuad(Matrix matrix);
		void DrawQuad(Matrix matrix, Matrix textureMatrix, BaseTexture texture);
		void DrawLineList(Matrix matrix, VertexBuffer vertexBuffer, int linesCount);

		Texture CreateRenderTarget(int width, int height);
		IDisposable RenderTo(Texture renderTarget);
		IDisposable BeginOcclusionMap(Texture occlusionMap, RectangleF bounds, float lightSize);
		IDisposable BeginShadowCast(Texture lightMap, float lightSize);
		IDisposable BeginLight(Texture lightMap, Color lightColor);
		BaseTexture GetFirstPassTexture();
		void DrawLightPlaceholder(Vector2 position, float radius, Color color);
		void DrawLineStrip(Matrix matrix, VertexBuffer vertexBuffer, int linesCount);
	}

	public interface IMainRenderer : IRenderer
	{
		IDisposable BeginFirstPass();
		IDisposable BeginSecondPass();
	}
}